package fr.emn.fil.soc.gr3.views;

import java.awt.BorderLayout;

import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.border.EmptyBorder;
import javax.swing.table.DefaultTableModel;

public class DialogListeSujets extends JDialog {

	/**
	 * 
	 */
	private static final long serialVersionUID = -2173508283632349301L;
	

	private MainFrame parent;
	private final JPanel contentPanel = new JPanel();
	private DefaultTableModel dtm = new DefaultTableModel();
	private JTable table_listeSujet;
	private JScrollPane scrollPane_listeSujets = new JScrollPane();
	
	public DialogListeSujets(MainFrame pparent) {
		super(pparent,"Liste des Sujets disponibles",true);
		parent = pparent;
		setSize(600,400);
		setLocationRelativeTo(null);

		getContentPane().setLayout(new BorderLayout());
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		contentPanel.setLayout(new BorderLayout(0, 0));
		contentPanel.add(scrollPane_listeSujets, BorderLayout.CENTER);
		table_listeSujet = new JTable(dtm);
		scrollPane_listeSujets.setViewportView(table_listeSujet);
	}

	public MainFrame getParent() {
		return parent;
	}

	public JTable getTable_listeSujet() {
		return table_listeSujet;
	}

	public JScrollPane getScrollPane_listeSujets() {
		return scrollPane_listeSujets;
	}

	public DefaultTableModel getDtm() {
		return dtm;
	}

}
